﻿using System;
namespace Kis.Xroad.Eu {
    
    
    [System.SerializableAttribute()]
    public partial class InlineSimpleTypeArray {
        
        private System.Collections.Generic.List<InlineSimpleTypeArray.WorkTitlesType> @__workTitles = new System.Collections.Generic.List<InlineSimpleTypeArray.WorkTitlesType>();
        
        public InlineSimpleTypeArray() {
        }
        
        /// <summary>
        /// All parameters
        /// </summary>
        public InlineSimpleTypeArray(System.Collections.Generic.List<InlineSimpleTypeArray.WorkTitlesType> @workTitles) {
            this.@__workTitles = @workTitles;
        }
        
        /// <summary>
        /// Copy Constructor
        /// </summary>
        protected InlineSimpleTypeArray(InlineSimpleTypeArray @inlineSimpleTypeArray) {
            this.@__workTitles = @inlineSimpleTypeArray.WorkTitles;
        }
        
        public virtual System.Collections.Generic.List<InlineSimpleTypeArray.WorkTitlesType> WorkTitles {
            get {
                return this.@__workTitles;
            }
            set {
                this.@__workTitles = value;
            }
        }
        
        [System.SerializableAttribute()]
        public class WorkTitlesType : global::Xtee.Core.Schema.XsdString {
            
            public const string EXECUTIVE = "Executive";
            
            public const string PARKATTENDANT = "ParkAttendant";
            
            public const string PROGRAMMER = "Programmer";
            
            public const string PROJECTMANAGER = "ProjectManager";
            
            public WorkTitlesType(string value) : 
                    base(value) {
                this.Validate();
                string annot = null;
                if (Value == "Executive") {
                    annot = "Executive";
                }
                if (Value == "ParkAttendant") {
                    annot = "ParkAttendant";
                }
                if (Value == "Programmer") {
                    annot = "Programmer";
                }
                if (Value == "ProjectManager") {
                    annot = "ProjectManager";
                }
                if (annot!=null) {
                    this._annotation = annot;
                }
                else {
                    throw new global::Xtee.Core.Types.XteeSimpleTypeValidationException(string.Format("Enumeration on [{0}] does not allow value : [{1}] ", this.GetType().Name,Value.ToString()));;
                }
            }
            
            public WorkTitlesType() : 
                    base(string.Empty) {
            }
            
            public static bool TryParse(string value, out WorkTitlesType result) {
                try {
                    result = new WorkTitlesType(value);
                    return true;
                }
                catch (System.Exception ) {
                    result = null;
                    return false;
                }
            }
            
            public static implicit operator String (WorkTitlesType value) {
                return value.Value;
            }
            
            public static implicit operator WorkTitlesType (string value) {
                if (value==null) {
                    return null;
                }
                return new WorkTitlesType(value);
            }
        }
    }
}
